<!doctype html><html lang="en">
 <head>
  <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  <title>CSS Generated Content for Paged Media Module Level 4</title>
  <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
  <meta content="exploring" name="csswg-work-status">
  <meta content="ED" name="w3c-status">
  <meta content="Level 4 of GCPM proposes a region-based approach to footnotes and running heads." name="abstract">
  <link href="../default.css" rel="stylesheet" type="text/css">
  <link href="../csslogo.ico" rel="shortcut icon" type="image/x-icon">
<style>
  body {
    background: url("https://www.w3.org/StyleSheets/TR/logo-ED") top left no-repeat;
  }
  </style>
  <link href="https://drafts.csswg.org/css-gcpm-4/" rel="canonical">
<style>/* style-md-lists */

/* This is a weird hack for me not yet following the commonmark spec
   regarding paragraph and lists. */
[data-md] > :first-child {
    margin-top: 0;
}
[data-md] > :last-child {
    margin-bottom: 0;
}</style>
<style>/* style-counters */

body {
    counter-reset: example figure issue;
}
.issue {
    counter-increment: issue;
}
.issue:not(.no-marker)::before {
    content: "Issue " counter(issue);
}

.example {
    counter-increment: example;
}
.example:not(.no-marker)::before {
    content: "Example " counter(example);
}
.invalid.example:not(.no-marker)::before,
.illegal.example:not(.no-marker)::before {
    content: "Invalid Example" counter(example);
}

figcaption {
    counter-increment: figure;
}
figcaption:not(.no-marker)::before {
    content: "Figure " counter(figure) " ";
}</style>
<style>/* style-dfn-panel */

.dfn-panel {
    position: absolute;
    z-index: 35;
    height: auto;
    width: -webkit-fit-content;
    width: fit-content;
    max-width: 300px;
    max-height: 500px;
    overflow: auto;
    padding: 0.5em 0.75em;
    font: small Helvetica Neue, sans-serif, Droid Sans Fallback;
    background: #DDDDDD;
    color: black;
    border: outset 0.2em;
}
.dfn-panel:not(.on) { display: none; }
.dfn-panel * { margin: 0; padding: 0; text-indent: 0; }
.dfn-panel > b { display: block; }
.dfn-panel a { color: black; }
.dfn-panel a:not(:hover) { text-decoration: none !important; border-bottom: none !important; }
.dfn-panel > b + b { margin-top: 0.25em; }
.dfn-panel ul { padding: 0; }
.dfn-panel li { list-style: inside; }
.dfn-panel.activated {
    display: inline-block;
    position: fixed;
    left: .5em;
    bottom: 2em;
    margin: 0 auto;
    max-width: calc(100vw - 1.5em - .4em - .5em);
    max-height: 30vh;
}

.dfn-paneled { cursor: pointer; }
</style>
<style>/* style-selflinks */

.heading, .issue, .note, .example, li, dt {
    position: relative;
}
a.self-link {
    position: absolute;
    top: 0;
    left: calc(-1 * (3.5rem - 26px));
    width: calc(3.5rem - 26px);
    height: 2em;
    text-align: center;
    border: none;
    transition: opacity .2s;
    opacity: .5;
}
a.self-link:hover {
    opacity: 1;
}
.heading > a.self-link {
    font-size: 83%;
}
li > a.self-link {
    left: calc(-1 * (3.5rem - 26px) - 2em);
}
dfn > a.self-link {
    top: auto;
    left: auto;
    opacity: 0;
    width: 1.5em;
    height: 1.5em;
    background: gray;
    color: white;
    font-style: normal;
    transition: opacity .2s, background-color .2s, color .2s;
}
dfn:hover > a.self-link {
    opacity: 1;
}
dfn > a.self-link:hover {
    color: black;
}

a.self-link::before            { content: "¶"; }
.heading > a.self-link::before { content: "§"; }
dfn > a.self-link::before      { content: "#"; }</style>
<style>/* style-autolinks */

.css.css, .property.property, .descriptor.descriptor {
    color: #005a9c;
    font-size: inherit;
    font-family: inherit;
}
.css::before, .property::before, .descriptor::before {
    content: "‘";
}
.css::after, .property::after, .descriptor::after {
    content: "’";
}
.property, .descriptor {
    /* Don't wrap property and descriptor names */
    white-space: nowrap;
}
.type { /* CSS value <type> */
    font-style: italic;
}
pre .property::before, pre .property::after {
    content: "";
}
[data-link-type="property"]::before,
[data-link-type="propdesc"]::before,
[data-link-type="descriptor"]::before,
[data-link-type="value"]::before,
[data-link-type="function"]::before,
[data-link-type="at-rule"]::before,
[data-link-type="selector"]::before,
[data-link-type="maybe"]::before {
    content: "‘";
}
[data-link-type="property"]::after,
[data-link-type="propdesc"]::after,
[data-link-type="descriptor"]::after,
[data-link-type="value"]::after,
[data-link-type="function"]::after,
[data-link-type="at-rule"]::after,
[data-link-type="selector"]::after,
[data-link-type="maybe"]::after {
    content: "’";
}

[data-link-type].production::before,
[data-link-type].production::after,
.prod [data-link-type]::before,
.prod [data-link-type]::after {
    content: "";
}

[data-link-type=element],
[data-link-type=element-attr] {
    font-family: Menlo, Consolas, "DejaVu Sans Mono", monospace;
    font-size: .9em;
}
[data-link-type=element]::before { content: "<" }
[data-link-type=element]::after  { content: ">" }

[data-link-type=biblio] {
    white-space: pre;
}</style>
 <body class="h-entry">
  <div class="head">
   <p data-fill-with="logo"><a class="logo" href="https://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2016/logos/W3C" width="72"> </a> </p>
   <h1 class="p-name no-ref" id="title">CSS Generated Content for Paged Media Module Level 4</h1>
   <h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="1970-01-01">1 January 1970</time></span></h2>
   <details>
    <summary>Specification Metadata</summary>
    <div data-fill-with="spec-metadata">
     <dl>
      <dt>This version:
      <dd><a class="u-url" href="https://drafts.csswg.org/css-gcpm-4/">https://drafts.csswg.org/css-gcpm-4/</a>
      <dt class="editor">Editors:
      <dd class="editor p-author h-card vcard" data-editor-id="65283"><a class="p-name fn u-email email" href="mailto:dauwhe@gmail.com">Dave Cramer</a> (<span class="p-org org">Hachette Livre</span>)
      <dd class="editor p-author h-card vcard" data-editor-id="13329"><a class="p-name fn u-email email" href="mailto:daniel.glazman@disruptive-innovations.com">Daniel Glazman</a> (<span class="p-org org">Disruptive Innovations</span>)
      <dt>Suggest an Edit for this Spec:
      <dd><a href="https://github.com/w3c/csswg-drafts/blob/master/css-gcpm-4-4/Overview.bs">GitHub Editor</a>
      <dt>Issue Tracking:
      <dd><a href="https://github.com/w3c/csswg-drafts/labels/css-gcpm-4-4">GitHub Issues</a>
     </dl>
    </div>
   </details>
   <div data-fill-with="warning">
    <details class="annoying-warning" open>
     <summary>Not Ready For Implementation</summary>
     <p> This spec is not yet ready for implementation.
		It exists in this repository to record the ideas and promote discussion. </p>
     <p> Before attempting to implement this spec,
		please contact the CSSWG at www-style@w3.org. </p>
    </details>
   </div>
   <p class="copyright" data-fill-with="copyright"><a href="https://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 1970 <a href="https://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="https://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="https://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="https://www.keio.ac.jp/">Keio</a>, <a href="https://ev.buaa.edu.cn/">Beihang</a>). W3C <a href="https://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="https://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document">permissive document license</a> rules apply. </p>
   <hr title="Separator for header">
  </div>
  <div class="p-summary" data-fill-with="abstract">
   <h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2>
   <p>Level 4 of GCPM proposes a region-based approach to footnotes and running heads.</p>
    <a href="https://www.w3.org/TR/CSS/">CSS</a> is a language for describing the rendering of structured documents
(such as HTML and XML)
on screen, on paper, etc. 
  </div>
  <h2 class="no-num no-toc no-ref heading settled" id="status"><span class="content">Status of this document</span></h2>
  <div data-fill-with="status">
   <p> This is a public copy of the editors’ draft.
	It is provided for discussion only and may change at any moment.
	Its publication here does not imply endorsement of its contents by W3C.
	Don’t cite this document other than as work in progress. </p>
   <p> <a href="https://github.com/w3c/csswg-drafts/issues">GitHub Issues</a> are preferred for discussion of this specification.
	When filing an issue, please put the text “css-gcpm-4” in the title,
	preferably like this:
	“[css-gcpm-4] <i data-lt>…summary of comment…</i>”.
	All issues and comments are <a href="https://lists.w3.org/Archives/Public/public-css-archive/">archived</a>,
	and there is also a <a href="https://lists.w3.org/Archives/Public/www-style/">historical archive</a>. </p>
   <p> This document was produced by the <a href="https://www.w3.org/Style/CSS/">CSS Working Group</a>. </p>
   <p> This document was produced by a group operating under
	the <a href="https://www.w3.org/Consortium/Patent-Policy/">W3C Patent Policy</a>.
	W3C maintains a <a href="https://www.w3.org/2004/01/pp-impl/32061/status" rel="disclosure">public list of any patent disclosures</a> made in connection with the deliverables of the group;
	that page also includes instructions for disclosing a patent.
	An individual who has actual knowledge of a patent which the individual believes contains <a href="https://www.w3.org/Consortium/Patent-Policy/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="https://www.w3.org/Consortium/Patent-Policy/#sec-Disclosure">section 6 of the W3C Patent Policy</a>. </p>
   <p> This document is governed by the <a href="https://www.w3.org/2019/Process-20190301/" id="w3c_process_revision">1 March 2019 W3C Process Document</a>. </p>
   <p></p>
  </div>
  <div data-fill-with="at-risk"></div>
  <nav data-fill-with="table-of-contents" id="toc">
   <h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2>
   <ol class="toc" role="directory">
    <li><a href="#introduction"><span class="secno"></span> <span class="content"> Introduction </span></a>
    <li>
     <a href="#running-headers-and-footers"><span class="secno">1</span> <span class="content"> Running headers and footers </span></a>
     <ol class="toc">
      <li><a href="#copy-into-heading"><span class="secno">1.1</span> <span class="content">Copying a flow: the <span class="property">copy-into</span> property</span></a>
      <li>
       <a href="#flow-persist-heading"><span class="secno">1.2</span> <span class="content">Choosing among multiple values on a page</span></a>
       <ol class="toc">
        <li><a href="#page-selector-pseudo-classes"><span class="secno">1.2.1</span> <span class="content">Page selector pseudo-classes</span></a>
       </ol>
     </ol>
    <li><a href="#page-area-head"><span class="secno">2</span> <span class="content">Creating Page Areas</span></a>
    <li>
     <a href="#footnotes"><span class="secno">3</span> <span class="content"> Footnotes </span></a>
     <ol class="toc">
      <li><a href="#footnote-terms"><span class="secno">3.1</span> <span class="content">Terminology</span></a>
      <li><a href="#footnotes-as-regions"><span class="secno">3.2</span> <span class="content">Footnotes as Regions</span></a>
     </ol>
    <li><a href="#acknowledgments"><span class="secno"></span> <span class="content"> Acknowledgments </span></a>
    <li>
     <a href="#conformance"><span class="secno"></span> <span class="content"> Conformance</span></a>
     <ol class="toc">
      <li><a href="#document-conventions"><span class="secno"></span> <span class="content"> Document conventions</span></a>
      <li><a href="#conform-classes"><span class="secno"></span> <span class="content"> Conformance classes</span></a>
      <li>
       <a href="#conform-responsible"><span class="secno"></span> <span class="content"> Requirements for Responsible Implementation of CSS</span></a>
       <ol class="toc">
        <li><a href="#conform-partial"><span class="secno"></span> <span class="content"> Partial Implementations</span></a>
        <li><a href="#conform-future-proofing"><span class="secno"></span> <span class="content"> Implementations of Unstable and Proprietary Features</span></a>
        <li><a href="#conform-testing"><span class="secno"></span> <span class="content"> Implementations of CR-level Features</span></a>
       </ol>
     </ol>
    <li>
     <a href="#index"><span class="secno"></span> <span class="content">Index</span></a>
     <ol class="toc">
      <li><a href="#index-defined-here"><span class="secno"></span> <span class="content">Terms defined by this specification</span></a>
      <li><a href="#index-defined-elsewhere"><span class="secno"></span> <span class="content">Terms defined by reference</span></a>
     </ol>
    <li>
     <a href="#references"><span class="secno"></span> <span class="content">References</span></a>
     <ol class="toc">
      <li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a>
      <li><a href="#informative"><span class="secno"></span> <span class="content">Informative References</span></a>
     </ol>
    <li><a href="#property-index"><span class="secno"></span> <span class="content">Property Index</span></a>
    <li><a href="#issues-index"><span class="secno"></span> <span class="content">Issues Index</span></a>
   </ol>
  </nav>
  <main>
   <h2 class="no-num heading settled" id="introduction"><span class="content"> Introduction </span></h2>
   <p>There have been many proposals for using CSS to move document content, often motivated by the desire for magazine- or book-style layout of footnotes, running heads, pull quotes, sidebars, and so on. <a data-link-type="biblio" href="#biblio-css3gcpm">[CSS3GCPM]</a> used float: footnote and position: running(). The now-abandoned <a data-link-type="biblio" href="#biblio-css3gencon">[CSS3GENCON]</a> Working Draft used content: footnote. PrinceXML (and older GCPM drafts) has content: flow() and flow: static(). WHATWG CSS Books has flow: area().</p>
   <p>This module proposes a unified approach to paginated layout based on <a data-link-type="biblio" href="#biblio-css3-regions">[CSS3-REGIONS]</a> and <a data-link-type="biblio" href="#biblio-css3-page-template">[CSS3-PAGE-TEMPLATE]</a>. Additional properties will be introduced as necessary.</p>
   <h2 class="heading settled" data-level="1" id="running-headers-and-footers"><span class="secno">1. </span><span class="content"> Running headers and footers </span><a class="self-link" href="#running-headers-and-footers"></a></h2>
    <a data-link-type="biblio" href="#biblio-css3page">[CSS3PAGE]</a> describes the sixteen page margin boxes which can be used for running headers and footers, but does not describe a mechanism for inserting content in those boxes. 
   <p><a data-link-type="biblio" href="#biblio-css3gcpm">[CSS3GCPM]</a> provides for copying the string values of elements into the existing page margin boxes.</p>
   <p>The existing mechanisms do not cover many use cases.</p>
   <h3 class="heading settled" data-level="1.1" id="copy-into-heading"><span class="secno">1.1. </span><span class="content">Copying a flow: the <a class="property" data-link-type="propdesc" href="#propdef-copy-into" id="ref-for-propdef-copy-into">copy-into</a> property</span><a class="self-link" href="#copy-into-heading"></a></h3>
   <p>Headers often contain document content, and it is desirable to both display that content normally (for example, as an <code>h1</code>) and to use the content in a running head. <a data-link-type="biblio" href="#biblio-css3-regions">[CSS3-REGIONS]</a> allows for an element to be moved to a <span class="css">named flow</span>, but doesn’t allow for using the same content in two ways. The <a class="property" data-link-type="propdesc" href="#propdef-copy-into" id="ref-for-propdef-copy-into①">copy-into</a> property allows an element to be copied into a content fragment which can then be placed with the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-content-3/#propdef-content" id="ref-for-propdef-content">content</a> property.</p>
   <p class="note" role="note">Use cases for running heads can be found in <a data-link-type="biblio" href="#biblio-dpub-latinreq">[dpub-latinreq]</a> https://w3c.github.io/dpub-pagination/#content</p>
   <table class="def propdef" data-link-for-hint="<dfn id=&quot;copy-into-property&quot;>copy-into</dfn>">
    <tbody>
     <tr>
      <th>Name:
      <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-copy-into">copy-into</dfn>
     <tr class="value">
      <th><a href="https://drafts.csswg.org/css-values/#value-defs">Value:</a>
      <td class="prod">none <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one">|</a> [ [ &lt;custom-ident>  &lt;content-level>] [<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-comma" id="ref-for-comb-comma">,</a> &lt;custom-ident>  &lt;content-level>]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-zero-plus" id="ref-for-mult-zero-plus">*</a> ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt">?</a>
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#initial-values">Initial:</a>
      <td>none
     <tr>
      <th>Applies to:
      <td>all elements and pseudo-elements, but not ::first-line or ::first-letter.
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#inherited-property">Inherited:</a>
      <td>no
     <tr>
      <th><a href="https://drafts.csswg.org/css-values/#percentages">Percentages:</a>
      <td>n/a
     <tr>
      <th><a href="https://drafts.csswg.org/css-cascade/#computed">Computed value:</a>
      <td>as specified
     <tr>
      <th>Canonical order:
      <td>per grammar
     <tr>
      <th><a href="https://drafts.csswg.org/web-animations/#animation-type">Animation type:</a>
      <td>discrete
   </table>
   <p>The <a class="property" data-link-type="propdesc" href="#propdef-copy-into" id="ref-for-propdef-copy-into②">copy-into</a> property contains one or more pairs, each consisting of a custom identifier followed by a content-level keyword describing how to construct the value of the named content fragment.</p>
   <p><span class="css">content-level</span> expands to the following values:</p>
<pre class="prod"><dfn data-dfn-type="dfn" data-noexport id="content-list">content-list<a class="self-link" href="#content-list"></a></dfn> = element <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one①">|</a> content <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one②">|</a> text <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one③">|</a> attr(&lt;identifier>) <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one④">|</a> counter() <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑤">|</a> counters()
</pre>
   <dl>
    <dt>element
    <dd>the entire element is copied into the named content fragment
    <dt>contents
    <dd>only the element’s contents are copied into the named content fragment. This is the default if <span class="css">content-level</span> is not specified.
    <dt>text
    <dd>only the element’s text (including normally collapsed white space) is copied into the named content fragment.
   </dl>
   <div class="example" id="example-3cd5e9c7">
    <a class="self-link" href="#example-3cd5e9c7"></a> 
<pre>h1 {
  copy-into: chapter-title element;
  font-size: 1.5em;
}

@page {
  @top-center {
    content: chapter-title '.';
    font-size: .9em;
    font-variant: small-caps;
    }
}
</pre>
   </div>
   <h3 class="heading settled" data-level="1.2" id="flow-persist-heading"><span class="secno">1.2. </span><span class="content">Choosing among multiple values on a page</span><a class="self-link" href="#flow-persist-heading"></a></h3>
   <h4 class="heading settled" data-level="1.2.1" id="page-selector-pseudo-classes"><span class="secno">1.2.1. </span><span class="content">Page selector pseudo-classes</span><a class="self-link" href="#page-selector-pseudo-classes"></a></h4>
   <p>By default, the content fragment name would be global, as the named flow is with <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-regions-1/#propdef-flow-into" id="ref-for-propdef-flow-into">flow-into</a>. But if one of the following pseudo-classes are used on the subject of the selector, then the name is locally scoped to just the page the element is on.</p>
   <dl>
    <dt><dfn class="css" data-dfn-type="selector" data-export id="selectordef-nth-of-page-n">:nth-of-page(n)<a class="self-link" href="#selectordef-nth-of-page-n"></a></dfn>
    <dd>The element is the nth matched element on the page.
    <dt><dfn class="css" data-dfn-type="selector" data-export id="selectordef-first-of-page">:first-of-page<a class="self-link" href="#selectordef-first-of-page"></a></dfn>
    <dd>Same as :nth-of-page(n), but where n = 1 (it is the first matched element on the page).
    <dt><dfn class="css" data-dfn-type="selector" data-export id="selectordef-last-of-page">:last-of-page<a class="self-link" href="#selectordef-last-of-page"></a></dfn>
    <dd>The element is the last matched element on the page.
    <dt><dfn class="css" data-dfn-type="selector" data-export id="selectordef-start-of-page">:start-of-page<a class="self-link" href="#selectordef-start-of-page"></a></dfn>
    <dd>The element is the first matched element on the page, and neither it nor its ancestors have any previous siblings that appear on the page.
   </dl>
   <div class="example" id="example-635562dc">
    <a class="self-link" href="#example-635562dc"></a> 
    <p>HTML:</p>
<pre>&lt;h1>The Voyage of the <i>Beagle</i>&lt;/h1>
</pre>
    <p>CSS:</p>
<pre>h1::before {
  content: 'Chapter 'counter(chapterNumber);
}
h1:first-of-page {
  copy-into: headerP1 counter(chapter), headerP2;
}
h1::after {
  content: '.' copy-into: headerP3;
}

@top-center {
  content: headerP1 ": " headerP2 headerP3;
}
</pre>
    <p>The value of the named string “headerP1” will be “Chapter 1”, and the value of the named string “headerP2” will be “Voyage of the <i>Beagle</i>”. headerP2 will include the italic tags around "Beagle", because the <code>content-type</code> defaults to <span class="css">contents</span>, not <span class="css">text</span>. The value of the named string “headerP3” will be “.”. The top-center content will be “Chapter 1: The Voyage of the <i>Horizon</i>.”</p>
   </div>
   <div class="example" id="example-d1cfe769">
    <a class="self-link" href="#example-d1cfe769"></a> HTML: 
<pre>&lt;section title="Loomings">
</pre>
    <p>CSS:</p>
<pre>section:first-of-page { copy-into: header attr(title) }
</pre>
    <p>The value of the “header” string will be “Loomings”, assuming that section intersected with the page.</p>
   </div>
   <div class="example" id="example-426c4f92">
    <a class="self-link" href="#example-426c4f92"></a> CSS: 
<pre>@page {
   size: 15cm 10cm;
   margin: 1.5cm;

   @top-left {
   content: "first: " heading1;
   }
   @top-center {
   content: "start: " heading2;
   }
    @top-right {
    content: "last: " heading3;
   }
  }

h2:first-of-page { copy-into: heading1 }
h2:start-of-page { copy-into: heading2 }
h2:last-of-page { copy-into: heading3 }
</pre>
    <p>The following figures show the first, start, and last assignments of the “heading” string on various pages.</p>
    <figure>
      <img alt src="images/using-strings-1.jpg" width="480"> 
     <figcaption>The <code>start</code> value is empty, as the string had not yet been set at the start of the page.</figcaption>
    </figure>
    <figure>
      <img alt src="images/using-strings-2.jpg" width="480"> 
     <figcaption>Since the page starts with an h2, the <code>start</code> value is the value of that head.</figcaption>
    </figure>
    <figure>
      <img alt src="images/using-strings-3.jpg" width="480"> 
     <figcaption>Since there’s not an h2 at the top of this page, the <code>start</code> value is the exit value of the previous page.</figcaption>
    </figure>
   </div>
   <h2 class="heading settled" data-level="2" id="page-area-head"><span class="secno">2. </span><span class="content">Creating Page Areas</span><a class="self-link" href="#page-area-head"></a></h2>
   <p><a data-link-type="biblio" href="#biblio-css3-page-template">[CSS3-PAGE-TEMPLATE]</a> introduces @template and @slot rules. We propose to allow the use of @slot in the @page context, to allow greater flexibility than the page margin boxes in <a data-link-type="biblio" href="#biblio-css3page">[CSS3PAGE]</a>. These slots can also be used for sidenotes, pull quotes, footnotes, and many other document features.</p>
   <div class="example" id="example-776d51e1">
    <a class="self-link" href="#example-776d51e1"></a> 
<pre>@page body {
  @slot center-header {
    top: 0px;
    left: 1em;
    right: 1em;
    height: 2em;
    flow-from: header;
    flow-persist: persist;
    wrap-flow: clear;
  }
}

</pre>
   </div>
   <p class="issue" id="issue-de25de6c"><a class="self-link" href="#issue-de25de6c"></a>Is there a need for both @page and @template?</p>
   <h2 class="heading settled" data-level="3" id="footnotes"><span class="secno">3. </span><span class="content"> Footnotes </span><a class="self-link" href="#footnotes"></a></h2>
    Ancillary content may be moved to the bottom or side of a page. A footnote is created when such content moves to the bottom of the page, leaving a reference indicator. 
   <h3 class="heading settled" data-level="3.1" id="footnote-terms"><span class="secno">3.1. </span><span class="content">Terminology</span><a class="self-link" href="#footnote-terms"></a></h3>
   <p>Footnotes are complex objects, so it will be helpful to define some terms before proceeding.</p>
   <figure>
    <p><img alt="page with footnotes" src="images/footnote-diagram.001.jpg" width="480"></p>
    <figcaption>Footnote terminology</figcaption>
   </figure>
   <dl>
    <dt>footnote element
    <dd>The element containing the content of the footnote, which will be removed from the flow and displayed as a footnote.
    <dt>footnote marker (also known as footnote number)
    <dd>A number or symbol adjacent to the footnote body, identifying the particular footnote. The footnote marker should use the same number or symbol as the corresponding footnote call, although the marker may contain additional punctuation.
    <dt>footnote body
    <dd>The footnote marker is placed before the footnote element, and together they represent the footnote body, which will be placed in the footnote area.
    <dt>footnote call (also known as footnote reference)
    <dd>A number or symbol, found in the main text, which points to the footnote body.
    <dt>footnote area
    <dd>The page area used to display footnotes.
    <dt>footnote rule (also known as footnote separator)
    <dd>A horizontal rule is often used to separate the footnote area from the rest of the page. The separator (and the entire footnote area) cannot be rendered on a page with no footnotes.
   </dl>
   <h3 class="heading settled" data-level="3.2" id="footnotes-as-regions"><span class="secno">3.2. </span><span class="content">Footnotes as Regions</span><a class="self-link" href="#footnotes-as-regions"></a></h3>
   <div class="example" id="example-4a4d04f0">
    <a class="self-link" href="#example-4a4d04f0"></a> HTML: 
<pre style="word-wrap: break-word; white-space: pre-wrap;">&lt;p>Though the body was erect, the head was thrown back so that the closed eyes were pointed towards the needle of the tell-tale that swung from a beam in the ceiling..&lt;span class="reference">&lt;span class="footnote">The cabin-compass is called the tell-tale, because without going to the compass at the helm, the Captain, while below, can inform himself of the course of the ship.&lt;/span>&lt;/span>&lt;/p>
</pre>
    <p>CSS:</p>
<pre>span.footnote {
  flow-into: footnote;
  flow-policy: copy;
  display: block;
}

span.footnote::before {
  content: counter(footnote) '. ';
}

span.reference::before {
  content: counter(footnote);
  font-variant-position: super;
}

@page {
  @slot footnote {
    flow-from: footnote;
    required-flow: footnote;
    position: absolute;
    left: 54pt;
    bottom: 0pt;
    width: 352pt;
    height: auto;
    border-top: .25pt solid black;
    vertical-align: bottom;
    wrap-flow: clear;
  }
}
</pre>
   </div>
   <p class="issue" id="issue-5b376f66"><a class="self-link" href="#issue-5b376f66"></a>The above HTML contains two nested spans for the footnote, as CSS has no mechanism to leave a reference object where something was removed from the flow.</p>
   <p class="issue" id="issue-db66e478"><a class="self-link" href="#issue-db66e478"></a>Would it be possible to specify <code>flow-into: none</code> on <code>span.footnote::after</code>? <a data-link-type="biblio" href="#biblio-css3-regions">[CSS3-REGIONS]</a> forbids the flow-into property on pseudo-elements, but should that be changed?</p>
   <div class="example" id="example-7e61490d">
    <a class="self-link" href="#example-7e61490d"></a> Inline footnote 
<pre>span.footnote {
  flow-into: footnote;
  display: inline;
}
</pre>
   </div>
   <h2 class="no-num heading settled" id="acknowledgments"><span class="content"> Acknowledgments </span><a class="self-link" href="#acknowledgments"></a></h2>
   <p>Tab Atkins, Jr., Brad Kemper, Håkon Wium Lie, Liam Quin, Peter Sorotokin, Alan Stearns</p>
  </main>
  <h2 class="no-ref no-num heading settled" id="conformance"><span class="content"> Conformance</span><a class="self-link" href="#conformance"></a></h2>
  <h3 class="heading settled" id="document-conventions"><span class="content"> Document conventions</span><a class="self-link" href="#document-conventions"></a></h3>
  <p>Conformance requirements are expressed with a combination of
	descriptive assertions and RFC 2119 terminology. The key words “MUST”,
	“MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”,
	“RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this
	document are to be interpreted as described in RFC 2119.
	However, for readability, these words do not appear in all uppercase
	letters in this specification. </p>
  <p>All of the text of this specification is normative except sections
	explicitly marked as non-normative, examples, and notes. <a data-link-type="biblio" href="#biblio-rfc2119">[RFC2119]</a> </p>
  <p>Examples in this specification are introduced with the words “for example”
	or are set apart from the normative text with <code>class="example"</code>,
	like this: </p>
  <div class="example" id="example-ae2b6bc0">
   <a class="self-link" href="#example-ae2b6bc0"></a> 
   <p>This is an example of an informative example. </p>
  </div>
  <p>Informative notes begin with the word “Note” and are set apart from the
	normative text with <code>class="note"</code>, like this: </p>
  <p class="note" role="note">Note, this is an informative note. </p>
  <p>Advisements are normative sections styled to evoke special attention and are
	set apart from other normative text with <code>&lt;strong class="advisement"></code>, like
	this: <strong class="advisement"> UAs MUST provide an accessible alternative. </strong> </p>
  <h3 class="heading settled" id="conform-classes"><span class="content"> Conformance classes</span><a class="self-link" href="#conform-classes"></a></h3>
  <p>Conformance to this specification
	is defined for three conformance classes: </p>
  <dl>
   <dt>style sheet 
   <dd>A <a href="http://www.w3.org/TR/CSS2/conform.html#style-sheet">CSS
			style sheet</a>. 
   <dt>renderer 
   <dd>A <a href="http://www.w3.org/TR/CSS2/conform.html#user-agent">UA</a> that interprets the semantics of a style sheet and renders
			documents that use them. 
   <dt>authoring tool 
   <dd>A <a href="http://www.w3.org/TR/CSS2/conform.html#user-agent">UA</a> that writes a style sheet. 
  </dl>
  <p>A style sheet is conformant to this specification
	if all of its statements that use syntax defined in this module are valid
	according to the generic CSS grammar and the individual grammars of each
	feature defined in this module. </p>
  <p>A renderer is conformant to this specification
	if, in addition to interpreting the style sheet as defined by the
	appropriate specifications, it supports all the features defined
	by this specification by parsing them correctly
	and rendering the document accordingly. However, the inability of a
	UA to correctly render a document due to limitations of the device
	does not make the UA non-conformant. (For example, a UA is not
	required to render color on a monochrome monitor.) </p>
  <p>An authoring tool is conformant to this specification
	if it writes style sheets that are syntactically correct according to the
	generic CSS grammar and the individual grammars of each feature in
	this module, and meet all other conformance requirements of style sheets
	as described in this module. </p>
  <h3 class="heading settled" id="conform-responsible"><span class="content"> Requirements for Responsible Implementation of CSS</span><a class="self-link" href="#conform-responsible"></a></h3>
  <p>The following sections define several conformance requirements
		for implementing CSS responsibly,
		in a way that promotes interoperability in the present and future. </p>
  <h4 class="heading settled" id="conform-partial"><span class="content"> Partial Implementations</span><a class="self-link" href="#conform-partial"></a></h4>
  <p>So that authors can exploit the forward-compatible parsing rules to assign fallback values, <strong>CSS renderers <em>must</em> treat as invalid
		(and <a href="http://www.w3.org/TR/CSS2/conform.html#ignore">ignore as appropriate</a>)
		any at-rules, properties, property values, keywords, and other syntactic constructs
		for which they have no usable level of support</strong>.
		In particular, user agents <em>must not</em> selectively ignore
		unsupported property values and honor supported values in a single multi-value property declaration:
		if any value is considered invalid (as unsupported values must be),
		CSS requires that the entire declaration be ignored. </p>
  <h4 class="heading settled" id="conform-future-proofing"><span class="content"> Implementations of Unstable and Proprietary Features</span><a class="self-link" href="#conform-future-proofing"></a></h4>
  <p>To avoid clashes with future stable CSS features,
		the CSSWG recommends <a href="http://www.w3.org/TR/CSS/#future-proofing">following best practices</a> for the implementation of <a href="http://www.w3.org/TR/CSS/#unstable">unstable</a> features and <a href="http://www.w3.org/TR/CSS/#proprietary-extension">proprietary extensions</a> to CSS. </p>
  <h4 class="heading settled" id="conform-testing"><span class="content"> Implementations of CR-level Features</span><a class="self-link" href="#conform-testing"></a></h4>
  <p>Once a specification reaches the Candidate Recommendation stage,
		implementers should release an <a data-link-type="dfn" href="http://www.w3.org/TR/CSS/#vendor-prefix">unprefixed</a> implementation
		of any CR-level feature they can demonstrate
		to be correctly implemented according to spec,
		and should avoid exposing a prefixed variant of that feature. </p>
  <p>To establish and maintain the interoperability of CSS across
		implementations, the CSS Working Group requests that non-experimental
		CSS renderers submit an implementation report (and, if necessary, the
		testcases used for that implementation report) to the W3C before
		releasing an unprefixed implementation of any CSS features. Testcases
		submitted to W3C are subject to review and correction by the CSS
		Working Group. </p>
  <p>
   Further information on submitting testcases and implementation reports
		can be found from on the CSS Working Group’s website at <a href="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>.
		Questions should be directed to the <a href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a> mailing list. 
<script src="https://www.w3.org/scripts/TR/2016/fixup.js"></script>
  </p>
  <h2 class="no-num no-ref heading settled" id="index"><span class="content">Index</span><a class="self-link" href="#index"></a></h2>
  <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="content">Terms defined by this specification</span><a class="self-link" href="#index-defined-here"></a></h3>
  <ul class="index">
   <li><a href="#content-list">content-list</a><span>, in §1.1</span>
   <li><a href="#propdef-copy-into">copy-into</a><span>, in §1.1</span>
   <li><a href="#selectordef-first-of-page">:first-of-page</a><span>, in §1.2.1</span>
   <li><a href="#selectordef-last-of-page">:last-of-page</a><span>, in §1.2.1</span>
   <li><a href="#selectordef-nth-of-page-n">:nth-of-page(n)</a><span>, in §1.2.1</span>
   <li><a href="#selectordef-start-of-page">:start-of-page</a><span>, in §1.2.1</span>
  </ul>
  <aside class="dfn-panel" data-for="term-for-mult-zero-plus">
   <a href="https://drafts.csswg.org/css-values-4/#mult-zero-plus">https://drafts.csswg.org/css-values-4/#mult-zero-plus</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-mult-zero-plus">1.1. Copying a flow: the copy-into property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-comb-comma">
   <a href="https://drafts.csswg.org/css-values-4/#comb-comma">https://drafts.csswg.org/css-values-4/#comb-comma</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-comb-comma">1.1. Copying a flow: the copy-into property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-mult-opt">
   <a href="https://drafts.csswg.org/css-values-4/#mult-opt">https://drafts.csswg.org/css-values-4/#mult-opt</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-mult-opt">1.1. Copying a flow: the copy-into property</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-comb-one">
   <a href="https://drafts.csswg.org/css-values-4/#comb-one">https://drafts.csswg.org/css-values-4/#comb-one</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-comb-one">1.1. Copying a flow: the copy-into property</a> <a href="#ref-for-comb-one①">(2)</a> <a href="#ref-for-comb-one②">(3)</a> <a href="#ref-for-comb-one③">(4)</a> <a href="#ref-for-comb-one④">(5)</a> <a href="#ref-for-comb-one⑤">(6)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-flow-into">
   <a href="https://drafts.csswg.org/css-regions-1/#propdef-flow-into">https://drafts.csswg.org/css-regions-1/#propdef-flow-into</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-flow-into">1.2.1. Page selector pseudo-classes</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-propdef-content">
   <a href="https://drafts.csswg.org/css-content-3/#propdef-content">https://drafts.csswg.org/css-content-3/#propdef-content</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-content">1.1. Copying a flow: the copy-into property</a>
   </ul>
  </aside>
  <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span class="content">Terms defined by reference</span><a class="self-link" href="#index-defined-elsewhere"></a></h3>
  <ul class="index">
   <li>
    <a data-link-type="biblio">[css-values-4]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-mult-zero-plus" style="color:initial">*</span>
     <li><span class="dfn-paneled" id="term-for-comb-comma" style="color:initial">,</span>
     <li><span class="dfn-paneled" id="term-for-mult-opt" style="color:initial">?</span>
     <li><span class="dfn-paneled" id="term-for-comb-one" style="color:initial">|</span>
    </ul>
   <li>
    <a data-link-type="biblio">[CSS3-REGIONS]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-propdef-flow-into" style="color:initial">flow-into</span>
    </ul>
   <li>
    <a data-link-type="biblio">[CSS3GENCON]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-propdef-content" style="color:initial">content</span>
    </ul>
  </ul>
  <h2 class="no-num no-ref heading settled" id="references"><span class="content">References</span><a class="self-link" href="#references"></a></h2>
  <h3 class="no-num no-ref heading settled" id="normative"><span class="content">Normative References</span><a class="self-link" href="#normative"></a></h3>
  <dl>
   <dt id="biblio-css-values-4">[CSS-VALUES-4]
   <dd>Tab Atkins Jr.; Elika Etemad. <a href="https://www.w3.org/TR/css-values-4/">CSS Values and Units Module Level 4</a>. 31 January 2019. WD. URL: <a href="https://www.w3.org/TR/css-values-4/">https://www.w3.org/TR/css-values-4/</a>
   <dt id="biblio-css3-regions">[CSS3-REGIONS]
   <dd>Rossen Atanassov; Alan Stearns. <a href="https://www.w3.org/TR/css-regions-1/">CSS Regions Module Level 1</a>. 9 October 2014. WD. URL: <a href="https://www.w3.org/TR/css-regions-1/">https://www.w3.org/TR/css-regions-1/</a>
   <dt id="biblio-css3gencon">[CSS3GENCON]
   <dd>Elika Etemad; Dave Cramer. <a href="https://www.w3.org/TR/css-content-3/">CSS Generated Content Module Level 3</a>. 2 June 2016. WD. URL: <a href="https://www.w3.org/TR/css-content-3/">https://www.w3.org/TR/css-content-3/</a>
   <dt id="biblio-rfc2119">[RFC2119]
   <dd>S. Bradner. <a href="https://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>. March 1997. Best Current Practice. URL: <a href="https://tools.ietf.org/html/rfc2119">https://tools.ietf.org/html/rfc2119</a>
  </dl>
  <h3 class="no-num no-ref heading settled" id="informative"><span class="content">Informative References</span><a class="self-link" href="#informative"></a></h3>
  <dl>
   <dt id="biblio-css3-page-template">[CSS3-PAGE-TEMPLATE]
   <dd>Alan Stearns. <a href="https://drafts.csswg.org/css3-page-template/">CSS Pagination Templates Module Level 3</a>. Proposal for a CSS module. URL: <a href="https://drafts.csswg.org/css3-page-template/">https://drafts.csswg.org/css3-page-template/</a>
   <dt id="biblio-css3gcpm">[CSS3GCPM]
   <dd>Dave Cramer. <a href="https://www.w3.org/TR/css-gcpm-3/">CSS Generated Content for Paged Media Module</a>. 13 May 2014. WD. URL: <a href="https://www.w3.org/TR/css-gcpm-3/">https://www.w3.org/TR/css-gcpm-3/</a>
   <dt id="biblio-css3page">[CSS3PAGE]
   <dd>Elika Etemad; Simon Sapin. <a href="https://www.w3.org/TR/css-page-3/">CSS Paged Media Module Level 3</a>. 18 October 2018. WD. URL: <a href="https://www.w3.org/TR/css-page-3/">https://www.w3.org/TR/css-page-3/</a>
   <dt id="biblio-dpub-latinreq">[DPUB-LATINREQ]
   <dd>Dave Cramer. <a href="https://www.w3.org/TR/dpub-latinreq/">Requirements for Latin Text Layout and Pagination</a>. 30 September 2014. WD. URL: <a href="https://www.w3.org/TR/dpub-latinreq/">https://www.w3.org/TR/dpub-latinreq/</a>
  </dl>
  <h2 class="no-num no-ref heading settled" id="property-index"><span class="content">Property Index</span><a class="self-link" href="#property-index"></a></h2>
  <div class="big-element-wrapper">
   <table class="index">
    <thead>
     <tr>
      <th scope="col">Name
      <th scope="col">Value
      <th scope="col">Initial
      <th scope="col">Applies to
      <th scope="col">Inh.
      <th scope="col">%ages
      <th scope="col">Anim­ation type
      <th scope="col">Canonical order
      <th scope="col">Com­puted value
    <tbody>
     <tr>
      <th scope="row"><a class="css" data-link-type="property" href="#propdef-copy-into" id="ref-for-propdef-copy-into③">copy-into</a>
      <td>none |  [ [ &lt;custom-ident>  &lt;content-level>] [,  &lt;custom-ident>  &lt;content-level>]*  ]?
      <td>none
      <td>all elements and pseudo-elements, but not ::first-line or ::first-letter.
      <td>no
      <td>n/a
      <td>discrete
      <td>per grammar
      <td>as specified
   </table>
  </div>
  <h2 class="no-num no-ref heading settled" id="issues-index"><span class="content">Issues Index</span><a class="self-link" href="#issues-index"></a></h2>
  <div style="counter-reset:issue">
   <div class="issue">Is there a need for both @page and @template?<a href="#issue-de25de6c"> ↵ </a></div>
   <div class="issue">The above HTML contains two nested spans for the footnote, as CSS has no mechanism to leave a reference object where something was removed from the flow.<a href="#issue-5b376f66"> ↵ </a></div>
   <div class="issue">Would it be possible to specify <code>flow-into: none</code> on <code>span.footnote::after</code>? <a data-link-type="biblio" href="#biblio-css3-regions">[CSS3-REGIONS]</a> forbids the flow-into property on pseudo-elements, but should that be changed?<a href="#issue-db66e478"> ↵ </a></div>
  </div>
  <aside class="dfn-panel" data-for="propdef-copy-into">
   <b><a href="#propdef-copy-into">#propdef-copy-into</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-propdef-copy-into">1.1. Copying a flow: the copy-into property</a> <a href="#ref-for-propdef-copy-into①">(2)</a> <a href="#ref-for-propdef-copy-into②">(3)</a>
   </ul>
  </aside>
<script>/* script-dfn-panel */

document.body.addEventListener("click", function(e) {
    var queryAll = function(sel) { return [].slice.call(document.querySelectorAll(sel)); }
    // Find the dfn element or panel, if any, that was clicked on.
    var el = e.target;
    var target;
    var hitALink = false;
    while(el.parentElement) {
        if(el.tagName == "A") {
            // Clicking on a link in a <dfn> shouldn't summon the panel
            hitALink = true;
        }
        if(el.classList.contains("dfn-paneled")) {
            target = "dfn";
            break;
        }
        if(el.classList.contains("dfn-panel")) {
            target = "dfn-panel";
            break;
        }
        el = el.parentElement;
    }
    if(target != "dfn-panel") {
        // Turn off any currently "on" or "activated" panels.
        queryAll(".dfn-panel.on, .dfn-panel.activated").forEach(function(el){
            el.classList.remove("on");
            el.classList.remove("activated");
        });
    }
    if(target == "dfn" && !hitALink) {
        // open the panel
        var dfnPanel = document.querySelector(".dfn-panel[data-for='" + el.id + "']");
        if(dfnPanel) {
            dfnPanel.classList.add("on");
            var rect = el.getBoundingClientRect();
            dfnPanel.style.left = window.scrollX + rect.right + 5 + "px";
            dfnPanel.style.top = window.scrollY + rect.top + "px";
            var panelRect = dfnPanel.getBoundingClientRect();
            var panelWidth = panelRect.right - panelRect.left;
            if(panelRect.right > document.body.scrollWidth && (rect.left - (panelWidth + 5)) > 0) {
                // Reposition, because the panel is overflowing
                dfnPanel.style.left = window.scrollX + rect.left - (panelWidth + 5) + "px";
            }
        } else {
            console.log("Couldn't find .dfn-panel[data-for='" + el.id + "']");
        }
    } else if(target == "dfn-panel") {
        // Switch it to "activated" state, which pins it.
        el.classList.add("activated");
        el.style.left = null;
        el.style.top = null;
    }

});
</script>